<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<html>
	<%
		String path = request.getContextPath();
		String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
	 %>
  <head>
    <meta charset="UTF-8">
    <link href=<%=basePath+"/stylesheets/login.css"%> type="text/css" rel="stylesheet">
    <link rel="icon" href="images/icon.jpg">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录 - 4399Hotel</title>
    <style>
        html,body{
            height: 100%;
            background-color:#f1f1f1 ;
            margin: 0;
            padding: 0;
        }
    </style>
  </head>
  <body>
  	<%
  		String msg = (String)session.getAttribute("msg");
  		if(msg!=null&&msg!=""){
  			%>
  					<script type="text/javascript" language="javascript">
  						var msg = '<%=msg%>'
	    				alert(msg);
	    			</script>
  			<%
  		}
  		session.removeAttribute("msg");
  	 %>
    <div class="logoDiv">
        <a href="login.jsp">
            <img src=<%=basePath+"/images/logo.png" %> class="logoImg">
        </a>
    </div>
    <div class="login">
        <a href="" class="aLogin">登录</a>
        <form action="/HotelSystem/Servlets/LoginServlet" class="inputForm" method="post">
            <div>
                <span>
                     <img class="accImg" src=<%=basePath+"/images/account.jpg"%>>
                </span>
 				<!-- autocomplete关闭弹出自动完成输入框内容的选项 -->
                <input type="text" placeholder="账号" class="accountInput" autocomplete="off" name="account">
            </div>
            <div>
                <span>
                     <img class="pwdImg" src=<%=basePath+"/images/pwd.jpg"%>>
                </span>
                <input type="password" placeholder="密码" class="pwdInput" autocomplete="off" name="pwd">
            </div>
            <div style="margin-top: 10px;font-size: 14px">
                <a href="forget.jsp" style="float: left;margin-left: 50px;color: #999;text-decoration: none">忘记密码?</a>
                <a href="register.jsp" style="margin-left: 130px;color: #999;text-decoration: none">注册</a>
            </div>
            <div style="display: inline-block;margin-left: 10px;margin-top: 15px">
                <label style="color: #1e82ec;font-weight: 700">选择用户：</label>
                <span style="margin-left: 10px">管理员</span>
                <input type="radio" name="role" value="0" class="radioFormat" style="margin-left: 15px">
                <span style="margin-left: 10px">用户</span>
                <input type="radio" name="role" value="1" class="radioFormat" style="margin-left: 15px">
            </div>
            <input type="submit" value="登录" class="inputBtn">
        </form>
    </div>
  </body>
</html>
